/**
 * Created by abdulazizalonizi on 7/16/17.
 */
import java.util.Scanner ;

public class Task3 {
    public static void main (String [] args)
    {
        Scanner kb = new Scanner(System.in);

        System.out.println("enter your name");
        String s1 = kb.nextLine();


        int lastName = s1.indexOf(' ');

        String s2 = s1.substring(lastName) + " ," +s1.substring(0,1);

        System.out.println(s2);









    }
}
